// 封装有关用户的请求函数
import http from '../ubtils/request'

// 注册请求
export function regRequest(loginname, password) {
  return http({
    url: '/api/user/reg',
    method: 'POST',
    data: { loginname: loginname, password: password },
  })
}
// 登录请求
export function loginRequest(loginname, password) {
  return http({
    url: '/api/user/login',
    method: 'POST',
    data: { loginname: loginname, password: password },
  })
}
// 获取用户信息请求
export function getUserInfoRequest(userid) {
  return http({
    url: '/api/user/info',
    method: 'get',
    params: { userid: userid },
  })
}
